package com.qiji.video.mapper.extend;

import com.qiji.video.bean.BrowsingHistory;
import com.qiji.video.bean.Collection;
import com.qiji.video.bean.Comments;
import com.qiji.video.bean.Users;
import com.qiji.video.bean.dto.LoginDto;
import com.qiji.video.bean.dto.UserDto;
import com.qiji.video.bean.vo.LoginVo;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Repository
public interface UserExtendMapper {
    //根据用户id查看观看历史
    List<BrowsingHistory> selectBhByUid(Integer uid);
    //根据视频id查看评论
    List<Comments> selectByVid(Integer vid);
    //根据用户id查看收藏
    List<Collection> selectCollectByUid(Integer uid);

    //通过手机号查询
    Users getUserByPhone(String phone);
    //通过手机号修改密码
    Integer updateByPhone(Users users);

    //通过邮箱查询
    Users getUserByEmail(String email);
    //通过邮箱修改密码
    Integer updateByEmail(String email,String password);

    // 登录后修改时间
    Integer updateLoginTimeByPhone(HashMap map);

    // 更新用户信息
    int updateByPrimaryKey(UserDto userDto);
}
